package com.ruicar.afs.cloud.product.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author changyu.gui
 * @version 1.0
 * @date 2020/4/26 16:18
 */
@Data
@ApiModel(value = "产品模板原子表")
@TableName("product_template_atom")
public class ProductTemplateAtom extends BaseEntity<ProductTemplateAtom> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "产品模板id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productTemplateId;

    @ApiModelProperty(value = "产品原子id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productAtomId;

    @ApiModelProperty(value = "是否必填;0-否；1-是 ")
    private String isMust;

    @ApiModelProperty(value = "原子序号 ")
    private int atomSerialNumber;

    // 构造方法
    public ProductTemplateAtom(Long productTemplateId, Long productAtomId, String isMust, int atomSerialNumber) {
        this.productTemplateId = productTemplateId;
        this.productAtomId = productAtomId;
        this.isMust = isMust;
        this.atomSerialNumber = atomSerialNumber;
    }
}
